import os

dirpath = r'D:\ProgramFile2_OR\Python_Study_System\git_my_studyProject\week3'

for roots, dirs, files in os.walk(dirpath): #os.walk返回一个迭代器
    print("roots:",roots)
    print("dirs:",dirs)
    print("files:",files)
    print("-"*30)